<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>

<body>
<script>
//1.json
//var ren={name:'zhangsan',age:14,sex:'man',say:function(){
//	alert(this.name)	
//}};	
//alert(typeof ren)
//ren.say()
//alert(ren.age)
//alert(ren['age'])
//ren['say']();

//2.通过构造方法(类)的方式

//var ren={name:'zhangsan',age:14,sex:'man',say:function(){
//	alert(this.name)	
//}};
//var ren1={name:'zhangsan',age:14,sex:'man',say:function(){
//	alert(this.name)	
//}};
//var ren2={name:'zhangsan',age:14,sex:'man',say:function(){
//	alert(this.name)	
//}};
/*
	function ren (names,ages,sexs){
		this.name=names;
		this.age=ages;
		this.sex=sexs;
		this.say=function(){
			alert('123')	
		};
	};
var zhangsan=new ren('zhangsan',12,'man');
var lisi=new ren('lisi',12,'woman')
//alert(zhangsan.name)
alert(lisi.name)
*/
//3.
//-var obj=new Object();











</script>
</body>
</html>
